//
//  CYSearchVideoTableViewCell.m
//  cyydt
//
//  Created by chu on 2019/2/1.
//  Copyright © 2019 chu. All rights reserved.
//

#import "CYSearchVideoTableViewCell.h"

@implementation CYSearchVideoTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.shichangLabel.layer.cornerRadius = self.shichangLabel.frame.size.height / 2;
    self.shichangLabel.layer.masksToBounds = YES;
    self.shichangLabel.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:.4];
    self.shichangLabel.hidden = YES;
}

- (void)setModel:(CYProjectModel *)model{
    _model = model;
    NSUserDefaults *us = [NSUserDefaults standardUserDefaults];
    NSString * str = [us objectForKey:@"searchValue"];
    [self.headImageView sd_setImageWithURL:[NSURL URLWithString:model.cover_url] placeholderImage:[UIImage imageNamed:@"videoPlacehold"]];
    self.nicknameLabel.text = model.catname;
    self.bofangLabel.text = [NSString stringWithFormat:@"%@播放",model.views];
    self.titleLabel.attributedText = [NSMutableAttributedString stringWithHighLightSubstring:[[Tool sharedInstance] delHTMLBiqoQianWithHtml:model.slogan] substring:str];
    self.timeLabel.text = model.created_time;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
